package user;

import util.Record;

public class Doctor extends HospitalEmployee {

	public Doctor(String pNbr,String name, String division) {
		super(pNbr, name ,division, User.DOCTOR);
		
	}

	@Override
	public boolean controlRecordRead(Record rec) {
		return rec.getDoctor().equals(pNbr)	|| rec.getDivision().equals(division);
	}

	@Override
	public boolean controlWriteRecord(Record rec) {
		return rec.getDoctor().equals(pNbr);
	}

	@Override
	public boolean controlDeleteRecord(Record rec) {
		return rec.getDoctor().equals(pNbr);
	}

	@Override
	public boolean controlCreateDocument() {
		// TODO Auto-generated method stub
		return true;
	}

}
